<?php

class ValidatorHorarioClase extends sfValidatorSchema
{

	public function doClean($values)
	{
		if ($values['hora_inicio'] >= $values['hora_fin'])
		{
			$error = new sfValidatorError($this, 'invalid', array('column' => 'hora_fin'));
			throw new sfValidatorErrorSchema($this, array('hora_fin' => $error));
		}

		return $values;
	}

}